package cn.itcast.star.graph.core.utils;

import cn.itcast.star.graph.core.pojo.User;

/**
 * 用户信息_线程池变量
 */
public class UserUtil{

    public static ThreadLocal<User> userThreadLocal = new ThreadLocal<>();

    public static User getUser() {
        return userThreadLocal.get();
    }

    public static void save(User value) {
        userThreadLocal.set(value);
    }

    public static void remove() {
        userThreadLocal.remove();
    }
}
